// //事件的工具
// export const getTime = () => {
//   let message = ''
//   let hours = new Date().getHours()
//   if (hours <= 9) {
//     message = '早上'
//   } else if (hours <= 12) {
//     message = '上午'
//   } else if (hours <= 18) {
//     message = '下午'
//   } else {
//     message = '晚上好'
//   }
//   return message
// }

export const getTime = () => {
  let message = ''
  let hours = new Date().getHours()
  switch (hours) {
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
      message = '早上'
      break
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
      message = '下午'
      break
    case 18:
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      message = '晚上'
      break
    default:
      message = ''
      break
  }
  return message
}
